

#include "../base/Data_Base.h"

// asset
#include "../../util/asset/Asset_Adapter.h"
// ds Can_Array
#include "../../util/ds/Can_Array.cpp"
// tex dataset
#include "TwoD_TexBean.h"

#ifndef _TwoD_TexCan_H
#define _TwoD_TexCan_H


/** data-list's type */
typedef TwoD_TexBean TYPE_TEXARR;

/**
 *  config info
 */
struct TwoD_TexCan_Conf : public Data_Base_Conf, public Can_Array_Conf<TYPE_TEXARR>{
    /** 配置数组的类型定义 */
    typedef float CONFTYPE;
    // configure-array
    CONFTYPE* m_tConfs;
    // Asset_Adapter
    Asset_Adapter* m_cAssetAdapter;
        
    TwoD_TexCan_Conf();
    
};

class TwoD_TexCan : public Data_Base, public Can_Array<TYPE_TEXARR>
{
public:
    /**
     * load texture's byte data
     * return for result-state
     */
    int loadTex();
    
    /**
     * find tex data to return a new array
     * find by "identifier"
     */
    TwoD_TexCan* findByIdentifier(int* a_arIdent, int a_nSize);
    
    /**
     * construction
     */
    TwoD_TexCan();

protected:
    
    TwoD_TexCan_Conf* m_sTwoD_TexCan_Conf;
    
};

#endif





